﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////


#pragma once
#include "IDbObject.h"
#include "GcmpModelInterface.h"
#include "RegenDataId.h"


namespace gcmp
{
    class IElement;
    /// \brief 被扣减图形显示组件
    class GCMP_MODEL_INTERFACE_EXPORT ICutteeGraphicsElementShapeComponent : public IDbObject
    {
        DEFINE_CAST_DERIVED(gcmp::ICutteeGraphicsElementShapeComponent, gcmp::IDbObject);
    public:

        /// \brief 创建平台默认的被扣减图形显示组件。
        ///
        /// 此行为创建一个平台默认的被扣减图形显示组件。
        /// \return OwnerPtr<ICutteeGraphicsElementShapeComponent> 平台默认的被扣减图形显示组件。
        static OwnerPtr<ICutteeGraphicsElementShapeComponent> Create();

        /// \brief 获得Element被扣减的图形表达关联更新变化Id
        ///
        /// \return Element被扣减的图形表达关联更新变化Id
        virtual RegenDataId GetPreCutteeGraphicsElementShapeRdId() const = 0;

    public:
        /// \brief 设置该组件所属Element
        ///
        /// \param pOwnerElement 所属Element
        /// \return bool 设置成功返回true，失败返回false
        virtual bool SetOwnerElement(IElement* pOwnerElement) = 0;

        /// \brief 获得该组件所属的Element
        ///
        /// \return 所属的Element
        virtual IElement* GetOwnerElement() = 0;

        /// \brief 获得该组件所属的Element
        ///
        /// \return 所属的Element
        virtual const IElement* GetOwnerElement() const = 0;
    };
}

